package com.vueblog.service;

import com.vueblog.po.Blog;
import com.vueblog.vo.Archives;
import com.vueblog.vo.DetailBlog;
import com.vueblog.vo.SimpleBlog;

import java.util.List;
import java.util.Map;

public interface BlogService {
    List<SimpleBlog> findByTitleAndTypeIdAndPublished(Blog blog);

    int saveBlog(Blog blog);

    //管理员编辑更新的blog
    //和findShowBlogById的区别在于是否需要published=true
    DetailBlog findDetailBlogById(int id);

    //用户界面展示blog
    DetailBlog findShowBlogById(int id);

    int updateBlog(Blog blog);

    int deleteBlog(int id);

    List<DetailBlog> findAllForIndex();

    //分类页面展示的blog
    List<DetailBlog> findShowBlogsByTypeId(int typeId);

    //归档
    List<Archives> archiveShowBlog();

    //返回 published 的博客数量
    int countShowBlog();

    //用户搜索博客功能
    List<DetailBlog> findShowBlogByTitleOrContent(String keyword);
}
